﻿<%@ Page Title="" Language="C#" Theme="Default_Themes" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="KhenThuongKyLuat.aspx.cs" Inherits="DanhMuc_KhenThuongKyLuat" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <div class="row-fluid">
        <div class="span12">
            <div class="box">
                <div class="box-title">
                    <h3><i class="icon-file"></i>Khen thưởng - kỷ luật</h3>
                    <div class="box-tool">
                        <a data-action="collapse" href="#"><i class="icon-chevron-up"></i></a>
                        <a data-action="close" href="#"><i class="icon-remove"></i></a>
                    </div>
                </div>
                <div class="box-content" style="border:solid 1px #0094ff;">
                    <fieldset>
                        <legend>Khen thưởng</legend>
                        <asp:UpdatePanel ID="udt1" runat="server">
                            <ContentTemplate>
                                <div class="row-fluid">
                                    <div class="span6">
                                        <div class="box-content"  style="text-align:right;">
                                            <div class="box-content"  style="text-align:right;">
                                            <input type="hidden" runat="server" id="codeid" />
                                            Ngày khen thưởng&nbsp;&nbsp;&nbsp;
                                            <asp:TextBox runat="server" ID="txtNgayKhenThuong" CssClass="spancalenda"/>
                                            <asp:RequiredFieldValidator ID="rq1" runat="server" ErrorMessage="Nhập từ ngày" ValidationGroup="a" Display="None" SetFocusOnError="true" ControlToValidate="txtNgayKhenThuong"></asp:RequiredFieldValidator>
                                            <asp:ImageButton runat="Server" ID="Image1" ImageUrl="~/css/icons/lich.gif" AlternateText="Click to show calendar" />
                                            <ajaxToolkit:CalendarExtender ID="calendarButtonExtender" runat="server" TargetControlID="txtNgayKhenThuong" PopupButtonID="Image1" Format="dd/MM/yyyy" />
                                            <div style="height:5px;"></div>
                                            Danh hiệu &nbsp;&nbsp;&nbsp;
                                            <asp:DropDownList ID="drlDanhHieu" runat="server" CssClass="spannew"></asp:DropDownList>
                                            <asp:RequiredFieldValidator ID="rq2" runat="server" InitialValue="-1" ValidationGroup="a" ForeColor="Red" ControlToValidate="drlDanhHieu" ErrorMessage="Phải chọn danh hiệu" SetFocusOnError="true" Display="None"></asp:RequiredFieldValidator>
                                            <div style="height:5px;"></div>
                                            Nội dung &nbsp;&nbsp;&nbsp;
                                            <asp:TextBox ID="txtNoiDung" runat="server" CssClass="spannew"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator11" ControlToValidate="txtNoiDung" runat="server" ErrorMessage="Phải nhập nội dung" Display="None" SetFocusOnError="true" ForeColor="Red" ValidationGroup="a"></asp:RequiredFieldValidator>
                                            <div style="height:5px;"></div>
                                            Cấp khen thưởng &nbsp;&nbsp;&nbsp;
                                            <asp:TextBox ID="txtCapKhenThuong" runat="server" CssClass="spannew"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtCapKhenThuong" runat="server" ErrorMessage="Phải nhập nội dung" Display="None" SetFocusOnError="true" ForeColor="Red" ValidationGroup="a"></asp:RequiredFieldValidator>
                                            <div style="height:5px;"></div>
                                            Lý do
                                            <asp:TextBox ID="txtLyDo" runat="server" TextMode="MultiLine" CssClass="spannew" Height="50px"></asp:TextBox>
                                        </div>
                                        </div>
                                    </div>
                                    <div class="span6">
                                        <div class="box-content">
                                            <asp:GridView ID="gridkhenthuong" runat="server" DataKeyNames="ID" AutoGenerateColumns="false" OnRowDeleting="gridkhenthuong_RowDeleting">
                                                <Columns>
                                                    <asp:TemplateField HeaderText="Chọn">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                                                                CommandName="Delete" Text="Chọn"></asp:LinkButton>
                                                        </ItemTemplate>
                                                        <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Ngày khen thưởng" SortExpression="NgayKhenThuong">
                                                        <ItemTemplate>
                                                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("NgayKhenThuong") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle CssClass="ItemGridCell" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Nội dung" SortExpression="NoiDung">
                                                        <ItemTemplate>
                                                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("NoiDung") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle CssClass="ItemGridCell" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Lý do khen thưởng" SortExpression="LyDo">
                                                        <ItemTemplate>
                                                            <asp:Label ID="Label3" runat="server" Text='<%# Bind("LyDo") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle CssClass="ItemGridCell" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Danh hiệu" SortExpression="DanhHieu">
                                                        <ItemTemplate>
                                                            <asp:Label ID="Label4" runat="server" Text='<%# Bind("DanhHieu") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle CssClass="ItemGridCell" />
                                                    </asp:TemplateField>
                                                </Columns>
                                            </asp:GridView>
                                            <div style="height:15px;"></div>
                                            <asp:Button ID="btnadd" runat="server" Text="Thêm mới" Width="90px" CssClass="btn btn-primary" OnClick="btnadd_Click"/>
                                            <asp:Button ID="btnsave" ValidationGroup="a" runat="server" Text="Lưu" Width="90px" CssClass="btn btn-primary" OnClick="btnsave_Click" />
                                            <asp:Button ID="btnedit" runat="server" Text="Hiệu chỉnh" Width="90px" CssClass="btn btn-primary" OnClick="btnedit_Click"/>
                                            <asp:Button ID="btndelete" runat="server" Text="Xóa" Width="90px" CssClass="btn btn-primary" OnClick="btndelete_Click" OnClientClick="return confirm('Bạn có chắc xóa không?')"/>
                                            <span class="help-inline"><asp:Label ID="lblmessage" runat="server" Text="" ForeColor="Red"></asp:Label></span>
                                            <div style="text-align:left">
                                                <asp:ValidationSummary ID="sum1" runat="server" ValidationGroup="a" HeaderText="Nhập đầu đủ thông tin trước khi lưu." ForeColor="Red" />
                                            </div>
                                       </div>
                                    </div>
                                </div>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="btnadd" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="btnsave" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="btnedit" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="btnedit" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="btndelete" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="gridkhenthuong" EventName="RowDeleting" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </fieldset>
                    <fieldset>
                        <legend>Kỷ luật</legend>
                        <asp:UpdatePanel ID="udt2" runat="server">
                            <ContentTemplate>
                                <div class="row-fluid">
                                    <div class="span6">
                                        <div class="box-content"  style="text-align:right;">
                                            <div class="box-content"  style="text-align:right;">
                                            <input type="hidden" runat="server" id="codeid1" />
                                            Ngày kỷ luật&nbsp;&nbsp;&nbsp;
                                            <asp:TextBox runat="server" ID="txtNgayKyLuat" CssClass="spancalenda"/>
                                            <asp:RequiredFieldValidator ID="rq11" runat="server" ErrorMessage="Nhập ngày" ValidationGroup="b" Display="None" SetFocusOnError="true" ControlToValidate="txtNgayKyLuat"></asp:RequiredFieldValidator>
                                            <asp:ImageButton runat="Server" ID="Image11" ImageUrl="~/css/icons/lich.gif" AlternateText="Click to show calendar" />
                                            <ajaxToolkit:CalendarExtender ID="calendarButtonExtender1" runat="server" TargetControlID="txtNgayKyLuat" PopupButtonID="Image11" Format="dd/MM/yyyy" />
                                            <div style="height:5px;"></div>
                                            Nội dung &nbsp;&nbsp;&nbsp;
                                            <asp:TextBox ID="txtNoiDungKyLuat" runat="server" CssClass="spannew"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator111" ControlToValidate="txtNoiDungKyLuat" runat="server" ErrorMessage="Phải nhập nội dung" Display="None" SetFocusOnError="true" ForeColor="Red" ValidationGroup="b"></asp:RequiredFieldValidator>
                                            <div style="height:5px;"></div>
                                            Cấp kỹ luật &nbsp;&nbsp;&nbsp;
                                            <asp:TextBox ID="txtCapKyLuat" runat="server" CssClass="spannew"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtCapKyLuat" runat="server" ErrorMessage="Phải nhập nội dung" Display="None" SetFocusOnError="true" ForeColor="Red" ValidationGroup="b"></asp:RequiredFieldValidator>
                                            <div style="height:5px;"></div>
                                            Lý do
                                            <asp:TextBox ID="txtLyDoKyLuat" runat="server" TextMode="MultiLine" CssClass="spannew" Height="50px"></asp:TextBox>
                                        </div>
                                        </div>
                                    </div>
                                    <div class="span6">
                                        <div class="box-content">
                                            <asp:GridView ID="gridKyLuat" runat="server" DataKeyNames="ID" AutoGenerateColumns="false" OnRowDeleting="gridKyLuat_RowDeleting">
                                                <Columns>
                                                    <asp:TemplateField HeaderText="Chọn">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                                                                CommandName="Delete" Text="Chọn"></asp:LinkButton>
                                                        </ItemTemplate>
                                                        <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Ngày kỷ luật" SortExpression="NgayKhenThuong">
                                                        <ItemTemplate>
                                                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("NgayKhenThuong") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle CssClass="ItemGridCell" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Nội dung" SortExpression="NoiDung">
                                                        <ItemTemplate>
                                                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("NoiDung") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle CssClass="ItemGridCell" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Lý do khen thưởng" SortExpression="LyDo">
                                                        <ItemTemplate>
                                                            <asp:Label ID="Label3" runat="server" Text='<%# Bind("LyDo") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle CssClass="ItemGridCell" />
                                                    </asp:TemplateField>
                                                </Columns>
                                            </asp:GridView>
                                            <div style="height:15px;"></div>
                                            <asp:Button ID="btnadd1" runat="server" Text="Thêm mới" Width="90px" CssClass="btn btn-primary" OnClick="btnadd1_Click" />
                                            <asp:Button ID="btnsave1" ValidationGroup="b" runat="server" Text="Lưu" Width="90px" CssClass="btn btn-primary" OnClick="btnsave1_Click" />
                                            <asp:Button ID="btnedit1" runat="server" Text="Hiệu chỉnh" Width="90px" CssClass="btn btn-primary" OnClick="btnedit_Click"/>
                                            <asp:Button ID="btndelete1" runat="server" Text="Xóa" Width="90px" CssClass="btn btn-primary" OnClick="btndelete1_Click" OnClientClick="return confirm('Bạn có chắc xóa không?')"/>
                                            <asp:LinkButton ID="btnclose" Visible="true" runat="server" class="btn  btn-danger"><i class="icon-signout"></i> Đóng</asp:LinkButton>                                            <span class="help-inline"><asp:Label ID="lblmessage1" runat="server" Text="" ForeColor="Red"></asp:Label></span>
                                            <div style="text-align:left">
                                                <asp:ValidationSummary ID="sum11" runat="server" ValidationGroup="b" HeaderText="Nhập đầu đủ thông tin trước khi lưu." ForeColor="Red" />
                                            </div>
                                       </div>
                                    </div>
                                </div>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="btnadd1" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="btnsave1" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="btnedit1" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="btnedit1" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="btndelete1" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="gridKyLuat" EventName="RowDeleting" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </fieldset>
                </div>
            </div>
        </div>
    </div>
</asp:Content>

